import 'package:flutter/material.dart';
import '../utils/adapt.dart';
import '../utils/request.dart';

class ShortVideo extends StatefulWidget {
  ShortVideo({Key? key}) : super(key: key);

  @override
  _ShortVideoState createState() => _ShortVideoState();
}

class _ShortVideoState extends State<ShortVideo> {
  var _list = [];
  void _getData() async {
    // 获取短视频不成功
    var res = await getHttp('/login/status');
    // print("获取登陆状态$res");
    // var res = await getHttp('/login/status');
    // print("获取登陆状态$res");
    // var res2 = await getHttp('/video/timeline/recommend?offset=10');
    // print("object---22$res2");
    // var res = await getHttp('/logout');
    // print("推出登陆$res");
  }

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _getData();
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      // height: 600,
      padding: EdgeInsets.all(Adapt.px(15)),
      color: Colors.pink,
      child: Wrap(
        spacing: Adapt.px(20),
        runSpacing: Adapt.px(20),
        children: [
          Container(
            width: Adapt.px(350),
            height: 200,
            color: Colors.blue,
          ),
          Container(
            width: Adapt.px(350),
            height: 200,
            color: Colors.blue[400],
          ),
          Container(
            width: Adapt.px(350),
            height: 200,
            color: Colors.blue[200],
          ),
        ],
      ),
    );
  }
}
